package com.example.test.conbase.base;

/**
 * 基础Presenter类
 * @param <V> 泛型View
 */
public abstract class BasePresenter <V extends BaseView> {
    private V mView;

    /**
     * 获取view对象
     * @return view对象
     */
    public V getView(){
        return mView;
    }

    /**
     * 初始化view
     * @param view view对象
     */
    public void attachView(V view){
        mView = view;
    }

    /**
     * 释放View
     */
    public void detachView(){
        mView = null;
    }
}
